package com.my12306.train.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.my12306.common.model.vo.PageVo;
import com.my12306.train.model.entity.OrderEntity;
import com.my12306.train.model.vo.OrderUserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户订单
 *
 * @author ËÕÄÁÏ¦
 * @email
 * @date 2020-07-24 20:58:07
 */
@Mapper
public interface OrderDao extends BaseMapper<OrderEntity> {
    /**
     * 分页查询
     *
     * @param pageVo
     * @param logicDelete
     * @return
     */
    List<OrderEntity> queryOrderPage(@Param("pageVo") PageVo pageVo, @Param("logicDelete") int logicDelete);

    /**
     * 分页查询总数
     *
     * @param pageVo
     * @param logicDelete
     * @return
     */
    Integer queryOrderCount(PageVo pageVo, Integer logicDelete);

    /**
     * 根据ids批量删除
     *
     * @param orderIds
     * @param logicDelete
     */
    void deleteOrderBatchByIds(@Param("list") List<Long> orderIds, @Param("logicDelete") Integer logicDelete);

    List<OrderUserVo> queryUserOrderPage(@Param("pageVo") PageVo pageVo, @Param("logicDelete") Integer logicDelete);
    Integer queryUserOrderPageCount(@Param("pageVo") PageVo pageVo, @Param("logicDelete") Integer logicDelet);
}
